package com.alibaba.cloud.json;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;


/**
 * The Class GsonUtil.
 */
public class GsonUtil {
	 
 	/** The Constant DATETIME_FORMAT. */
 	// 年月日 时分秒
    public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
	
	/**
	 * Gets the single instance of GsonUtil.
	 *
	 * @return single instance of GsonUtil
	 */
	public static Gson getInstance() {
		return new GsonBuilder()
				.setDateFormat(DATETIME_FORMAT)
				.serializeNulls()
				.setPrettyPrinting()
				.setExclusionStrategies(new CusExclusionStrategy())
				.create();
	}
}
